namespace KDS.Mes.Migrations
{
    using System;
    using System.Collections.Generic;
    using System.Data.Entity.Infrastructure.Annotations;
    using System.Data.Entity.Migrations;
    
    public partial class UpdateOnline : DbMigration
    {
        public override void Up()
        {
            //AlterTableAnnotations(
            //    "dbo.T_Online",
            //    c => new
            //    {
            //        Id = c.Int(nullable: false, identity: true),
            //        LineId = c.Int(nullable: false),
            //        SeatID = c.String(maxLength: 50),
            //        OnlineTime = c.DateTime(),
            //        OfflineTime = c.DateTime(),
            //        WorkTime = c.String(maxLength: 20),
            //        OfflineFlag = c.Int(nullable: false, defaultValue:0),
            //            BackrestAssemblyNo = c.String(maxLength: 20),
            //            CushionAssemblyNo = c.String(maxLength: 20),
            //            SlideNo = c.String(maxLength: 20),
            //            BackrestCoverNo = c.String(maxLength: 20),
            //            CushionCoverNo = c.String(maxLength: 20),
            //            BackrestFoamNo = c.String(maxLength: 20),
            //            CushionFoamNo = c.String(maxLength: 20),
            //            BackFrameNo = c.String(maxLength: 20),
            //            SABNo = c.String(maxLength: 20),
            //            HeadrestNo = c.String(maxLength: 20),
            //            CenterHeadrestNo = c.String(maxLength: 20),
            //            ArmRestNo = c.String(maxLength: 20),
            //            BuckleNo = c.String(maxLength: 20),
            //            BackplaneNo = c.String(maxLength: 20),
            //            AdjusterNo = c.String(maxLength: 20),
            //            AdjusterPlateNo = c.String(maxLength: 20),
            //            CushioSsupportNo = c.String(maxLength: 20),
            //        },
            //    annotations: new Dictionary<string, AnnotationValues>
            //    {
            //        { 
            //            "DynamicFilter_Online_SoftDelete",
            //            new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
            //        },
            //    });
            
            //AlterColumn("dbo.T_Online", "OnlineTime", c => c.DateTime());
            //AlterColumn("dbo.T_Online", "OfflineTime", c => c.DateTime());
            //AlterColumn("dbo.T_Online", "OfflineFlag", c => c.Int());
            //DropColumn("dbo.T_Online", "IsDeleted");
            //DropColumn("dbo.T_Online", "DeleterUserId");
            //DropColumn("dbo.T_Online", "DeletionTime");
            //DropColumn("dbo.T_Online", "LastModificationTime");
            //DropColumn("dbo.T_Online", "LastModifierUserId");
            //DropColumn("dbo.T_Online", "CreationTime");
            //DropColumn("dbo.T_Online", "CreatorUserId");
        }
        
        public override void Down()
        {
            //AddColumn("dbo.T_Online", "CreatorUserId", c => c.Long());
            //AddColumn("dbo.T_Online", "CreationTime", c => c.DateTime(nullable: false));
            //AddColumn("dbo.T_Online", "LastModifierUserId", c => c.Long());
            //AddColumn("dbo.T_Online", "LastModificationTime", c => c.DateTime());
            //AddColumn("dbo.T_Online", "DeletionTime", c => c.DateTime());
            //AddColumn("dbo.T_Online", "DeleterUserId", c => c.Long());
            //AddColumn("dbo.T_Online", "IsDeleted", c => c.Boolean(nullable: false));
            //AlterColumn("dbo.T_Online", "OfflineFlag", c => c.Int(nullable: false));
            //AlterColumn("dbo.T_Online", "OfflineTime", c => c.DateTime(nullable: false));
            //AlterColumn("dbo.T_Online", "OnlineTime", c => c.DateTime(nullable: false));
            //AlterTableAnnotations(
            //    "dbo.T_Online",
            //    c => new
            //        {
            //            Id = c.Int(nullable: false, identity: true),
            //            LineId = c.Int(nullable: false),
            //            SeatID = c.String(maxLength: 50),
            //            OnlineTime = c.DateTime(),
            //            OfflineTime = c.DateTime(),
            //            WorkTime = c.String(maxLength: 20),
            //            OfflineFlag = c.Int(),
            //            BackrestAssemblyNo = c.String(maxLength: 20),
            //            CushionAssemblyNo = c.String(maxLength: 20),
            //            SlideNo = c.String(maxLength: 20),
            //            BackrestCoverNo = c.String(maxLength: 20),
            //            CushionCoverNo = c.String(maxLength: 20),
            //            BackrestFoamNo = c.String(maxLength: 20),
            //            CushionFoamNo = c.String(maxLength: 20),
            //            BackFrameNo = c.String(maxLength: 20),
            //            SABNo = c.String(maxLength: 20),
            //            HeadrestNo = c.String(maxLength: 20),
            //            CenterHeadrestNo = c.String(maxLength: 20),
            //            ArmRestNo = c.String(maxLength: 20),
            //            BuckleNo = c.String(maxLength: 20),
            //            BackplaneNo = c.String(maxLength: 20),
            //            AdjusterNo = c.String(maxLength: 20),
            //            AdjusterPlateNo = c.String(maxLength: 20),
            //            CushioSsupportNo = c.String(maxLength: 20),
            //        },
            //    annotations: new Dictionary<string, AnnotationValues>
            //    {
            //        { 
            //            "DynamicFilter_Online_SoftDelete",
            //            new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
            //        },
            //    });
            
        }
    }
}
